using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ITS.Core.Domain.News;

namespace ITS.Services.News
{
    public static class NewsExtentions
    {
        public static bool NewsTagExists(this NewsItem newsItem,
        int newsTagID)
        {
            if (newsItem == null)
                throw new ArgumentNullException("product");

            bool result = newsItem.NewsTags.ToList().Find(nt => nt.TagID == newsTagID) != null;
            return result;
        }
    }
}
